<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>运营指标分析（总部）</title>
  <link rel="stylesheet" href="../../mobile_static/css/element.css">
  <link rel="stylesheet" href="../../mobile_static/css/base.css">
  <link rel="stylesheet" href="../../mobile_static/css/operationIndexAnalysis/operationIndexAnalysis.css">
  <script src="../../mobile_static/js/vue.js"></script>
  <script src="../../mobile_static/js/echarts.js"></script>
  <script src="../../mobile_static/js/element.js"></script>
  <script src="../../mobile_static/js/axios.js"></script>
  <script src="../../mobile_static/js/jquery-1.10.2.min.js"></script>
</head>

<body>
  <div id="app">
    <div class="app-content">
      <p style="height:15px;width: 100%;position: fixed;top:0;z-index: 10;background: #fff;"></p>

      <!-- 头部导航栏 -->
      <div class="top-bar">
        <ul>
          <li><a :class="{'selected':isSelect == 1}" @click="scroll_one">工作台应用</a> </li>
          <li v-if="isshow"><a :class="{'selected':isSelect == 2}" @click="scroll_two">组件</a></li>
          <li><a :class="{'selected':isSelect == 3}" @click=" scroll_three">APP</a></li>
        </ul>
        <div class="top-bar_right">
          <div class="selectBox">
            <el-select v-model="selectValue" filterable placeholder="请选择" @change="downChange">
              <el-option v-for="item in selectOptions" :key="item.g0departmentcode" :label="item.g0departmentname"
                :value="item.g0departmentcode">
              </el-option>
            </el-select>
          </div>
        </div>
      </div>
      <!-- 工作台应用统计分析 -->
      <div class="workbench" id="aworkbench" v-show="isSelect == 1">
        <h2 class="analysis"><span></span> 工作台应用统计分析</h2>
        <ul>
          <li class="cardOne" v-loading="loading1">
            <div class="workbench-cardOne_left">
              <h2> 工作台应用总数/个</h2>
              <p @click="All_num">{{Total_app_apps_num}}
              </p>
            </div>
            <img src="../../mobile_static/public/image/工作台，笔记本，手机.png" alt="">
            <div class="workbench-cardOne_right">
              <el-popover placement="top-start" width="200" trigger="hover" content="累计已发布的应用总数，相同企业内应用名称完全一致会进行去重；">
                <i slot="reference" class="el-icon-warning-outline"></i>
              </el-popover>
            </div>
          </li>
          <li class="cardTwo" v-loading="loading1">
            <div class="workbench-cardTwo_left">
              <h2>工作台应用类型占比</h2>
              <p style="margin-top: 15px;color: rgb(160, 160, 160);"><i
                  class="i-round_top"></i>集团统推：<span>{{Total_app_apps.k0proromotion}}</span>
                <span style="margin-left:10px">{{Total_app_apps.k0grouppush}}个</span>
              </p>
              <p style="color: rgb(160, 160, 160);">
                <i class="i-round_down"></i>
                企业自建：<span>{{Total_app_apps.k0probuiltenterprises}}</span> <span
                  style="margin-left: 10px;">{{Total_app_apps.k0ziji}}个</span>
              </p>
            </div>
            <div id="workbench-cardTwo_right">

            </div>
          </li>
          <li class="cardThree" v-if="isshow" v-loading="loading1">
            <div class="workbench-cardThree_left">
              <h2>企业自建占比</h2>
              <p style="margin-top: 15px;color: rgb(160, 160, 160);"><i
                  class="i-round_top"></i>自建应用企业：<span>{{Total_app_apps.k0probuiltapplications}}</span>
                <span style="margin-left:10px">{{Total_app_apps.k0zijenterprise}}家</span>
              </p>
              <p style="color: rgb(160, 160, 160);">
                <i class="i-round_down"></i>
                未自建应用企业：<span>{{Total_app_apps.k0notproromotion}}</span><span
                  style="margin-left: 10px;">{{Total_app_apps.k0weizijenterprise}}家</span>
              </p>
            </div>
            <div id="workbench-cardThree_right">

            </div>
          </li>
        </ul>
      </div>
      <!-- 企业自建工作台应用排行 -->
      <div class="enterpriseBuiltWorkbench" v-show="isshow&&isSelect == 1">
        <!-- 左边排行 -->
        <div class="left" v-loading="loading2">
          <div class="title-box">
            <h2>企业自建工作台应用排行</h2>
          </div>
          <div id="accessListOne" class="accessList">

          </div>
        </div>
        <!-- 右边图表 -->
        <div class="right">
          <div class="table-bar">
            <h2>企业自建工作台应用列表</h2>
            <div class="selector">
              <el-select v-model="value" style="width:150px;" placeholder="请选择" @change="search1">
                <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
              </el-select>
            </div>
            <div class="search-box">
              <el-input prefix-icon="el-icon-search" v-model="searchValue" placeholder="按企业名搜索" @change="search1">
              </el-input>
            </div>
            <div class="download-box">
              <el-button type="primary" @click="download_oneself">下载</el-button>
            </div>
          </div>
          <!-- 表格 -->
          <div class="table-box">
            <el-table :data="tableData" stripe style="width: 100%" v-loading="loading3" border height="350"
              :header-cell-style="{background: 'linear-gradient(180deg, #FAFAFA 0%, #F1F1F1 100%)',fontSize:'16px',fontWeight:'bold',color:'#000000'}">
              <el-table-column prop="g0enterprise_name" label="企业名称">
              </el-table-column>
              <el-table-column width="180" prop="k0appnums" :label="value === 1&&'自建应用个数'">
              </el-table-column>
            </el-table>
          </div>
          <!-- 分页 -->
          <div class="paging-box">
            <div class="block">
              <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="page"
                :page-sizes="[10, 20, 30, 40]" :page-size="size" layout="total, sizes, prev, pager, next, jumper"
                :total="length">
              </el-pagination>
            </div>
          </div>
        </div>
      </div>
      <!-- 工作台应用新增趋势 -->
      <div class="applicationTrend" v-show="isSelect == 1">
        <div class="left">
          <div class="left-bar">
            <h2>工作台应用新增趋势</h2>
            <div class="date-box">
              <el-date-picker v-model="timeValue" value-format="yyyy-MM" @change="DateChange_one" type="monthrange"
                unlink-panels range-separator="至" start-placeholder="请选择开始月份" end-placeholder="请选择结束月份">
              </el-date-picker>
            </div>
          </div>
          <div id="applicationTrendBox" v-loading="loading4"></div>
        </div>
        <div class="right">
          <div class="right-top">
            <h2>
              <el-popover placement="top-start" width="100" trigger="hover" content="新增工作台应用数">
                <span slot="reference">新增工作台应用数</span>
              </el-popover>
            </h2>
            <span v-loading="loading5">{{New_trend_right.k0nums}}</span>
          </div>
          <div class="right-down" style="position: relative;" v-loading="loading5">
            <p style="font-size: 16px;font-weight: 600;position: absolute;white-space: normal;left: 20px;top:15px;">
              工作台应用类型占比</p>
            <div class="right-down-left">
              <div class="push-top"><span></span>集团统推：{{New_trend_right.k0grouppush_rate}}</div>
              <div class="push-down"><span></span>企业自建：{{New_trend_right.k0ziji_rate}}</div>
            </div>
            <div class="right-down-right" id="groupSeriesPush"></div>
          </div>
        </div>
      </div>
      <!-- 工作台应用新增明细表 -->
      <div class="newAddApplication " v-show="isSelect == 1">
        <div class="table-bar search-box-list">
          <h2>
            工作台应用新增明细表</h2>
          <div class="selector flex middle">
            <el-select v-model="newAddApplicationValue" style="width:200px;position: relative; top: 3px;" filterable placeholder="请选择" @change="search2" :disabled="selectValue!=''">
              <el-option v-for="item in newAddApplicationValueOptions" :key="item.g0departmentcode"
                :label="item.g0departmentname" :value="item.g0departmentcode">
              </el-option>
            </el-select>
            <el-input prefix-icon="el-icon-search" class="ml10" style="width:200px;position: relative; top: 3px;" v-model="newAddApplicationSearchValue" placeholder="按应用名搜索"
              @change="search2">
            </el-input>
            <el-button type="primary" class="ml10" @click="download">下载</el-button>
          </div>
          <!-- <div class="search-box">
            <el-input prefix-icon="el-icon-search" v-model="newAddApplicationSearchValue" placeholder="按应用名搜索"
              @change="search2">
            </el-input>
          </div> -->
          <!-- <div class="download-box">
            <el-button type="primary" @click="download">下载</el-button>
          </div> -->
        </div>
        <!-- 表格 -->
        <div class="table-box">
          <el-table :data="newAddApplicationTableData" stripe style="width: 100%" v-loading="loading6" height="350"
            border :header-cell-style="{background: 'linear-gradient(180deg, #FAFAFA 0%, #F1F1F1 100%)',fontSize:'16px',fontWeight:'bold',color:'#000000'}">
            <el-table-column prop="g0modulename" label="工作台应用名称" min-width="180">
            </el-table-column>
            <el-table-column prop="g0module_type_desc" label="工作台应用类型" min-width="150">
            </el-table-column>
            <el-table-column prop="g0app_type_desc" label="APP类型" min-width="120">
            </el-table-column>
            <el-table-column prop="g0enterprise_name" label="所属企业" min-width="200">
            </el-table-column>
            <el-table-column prop="g0createdtime" label="发布时间" min-width="260">
            </el-table-column>
          </el-table>
        </div>
        <!-- 分页 -->
        <div class="paging-box">
          <div class="block">
            <el-pagination @size-change="handleSizeChange_two" @current-change="handleCurrentChange_two"
              :current-page="page_two" :page-sizes="[10, 20, 30, 40]" :page-size="size_two"
              layout="total, sizes, prev, pager, next, jumper" :total="length_two">
            </el-pagination>
          </div>
        </div>
      </div>
      <!--  工作台应用访问明细表 -->
      <div class="newAddApplication accessApplication" v-show="isSelect == 1">
        <div class="table-bar search-box-list" style="padding: 10px;">
          <h2>工作台应用访问明细表</h2>
          <ul>
            <li :class="{'selected':isAccessApplicationSelect == 1}" @click="isAccessApplicationSelect=1">近7天</li>
            <li :class="{'selected':isAccessApplicationSelect == 2}" @click="isAccessApplicationSelect=2">近30天</li>
            <li :class="{'selected':isAccessApplicationSelect == 3}" @click="isAccessApplicationSelect=3">全年</li>
          </ul>
          <div class="date-box">
            <el-date-picker style="position: relative;top:3px;" v-model="accessApplicationTimeValue" value-format="yyyy-MM-dd" @change="DateChange_two"
              unlink-panels type="daterange" range-separator="至" start-placeholder="请选择开始日期" end-placeholder="请选择结束日期">
            </el-date-picker>
          </div>
          <div class="search-box">
            <el-input style="position: relative;top:3px;" prefix-icon="el-icon-search" v-model="accessApplicationSearchValue" placeholder="按应用名称搜索"
              @change="search3">
            </el-input>
          </div>
        </div>
        <!-- 表格 -->
        <div class="table-box">
          <el-table :data="accessApplicationTableData" stripe style="width: 100%" v-loading="loading7"
            @sort-change="sortChange" height="350" border
            :header-cell-style="{background: 'linear-gradient(180deg, #FAFAFA 0%, #F1F1F1 100%)',fontSize:'16px',fontWeight:'bold',color:'#000000'}">
            <el-table-column prop="g0mdulename" label="工作台应用名称" min-width="180">
            </el-table-column>
            <el-table-column prop="g0module_type_desc" label="工作台应用类型" min-width="150">
            </el-table-column>
            <el-table-column prop="g0app_type_desc" label="APP类型" min-width="120">
            </el-table-column>
            <el-table-column prop="g0software_dept_enterprise_name" label="所属企业" min-width="200">
            </el-table-column>
            <el-table-column sortable="custom" prop="g0cumulativevisits" label="累计访问人次" min-width="200">
            </el-table-column>
          </el-table>
        </div>
        <!-- 分页 -->
        <div class="paging-box">
          <div class="block">
            <el-pagination @size-change="handleSizeChange_three" @current-change="handleCurrentChange_three"
              :current-page="page_three" :page-sizes="[10, 20, 30, 40]" :page-size="size_three"
              layout="total, sizes, prev, pager, next, jumper" :total="length_three">
            </el-pagination>
          </div>
        </div>
      </div>
      <!-- 组件统计分析 -->
      <div class="componentStatistics" id="acomponentStatistics" v-show="isshow&&isSelect == 2">
        <h2><span></span> 组件统计分析</h2>
        <div class="main-box">
          <div class="left">
            <h2>组件使用情况分布
              <el-popover placement="top-start" width="200" trigger="hover" content="统计组件使用的情况分布，只包含具有使用记录的组件；">
                <i style="color:#4583D6;" slot="reference" class="el-icon-warning-outline"></i>
              </el-popover>
            </h2>
            <div id="componentStatisticsBox" v-loading="loading8"></div>
          </div>
          <div class="right">
            <h2 v-loading="loading9">累计使用{{TotalNumberOfComponentsUsed}}次</h2>
            <div class="table-box">
              <el-table :data="componentStatisticsTableData" v-loading="loading8" stripe style="width: 100%"
                height="298" border
                :header-cell-style="{background: 'linear-gradient(180deg, #FAFAFA 0%, #F1F1F1 100%)',fontSize:'16px',fontWeight:'bold',color:'#000000'}">
                <el-table-column prop="g0component_name" label="组件名称">
                </el-table-column>
                <el-table-column prop="k0use_rate" label="占比" width="120">
                </el-table-column>
                <el-table-column prop="k0use_cnt" label="使用次数" width="120">
                </el-table-column>
              </el-table>
            </div>
          </div>
        </div>
      </div>
      <!-- APP统计分析 -->
      <div class="AppStatistical" id="aAppStatistical" v-show="isSelect == 3">
        <h2><span></span> APP统计分析</h2>
        <div class="AppTotal">
          <div class="AppTotal-left">
            <div class="AppTotal-left_left">
              <h2>APP总数/个 <el-popover placement="top-start" width="200" trigger="hover" content="累计至今已发布APP总数">
                  <i style="color:#4583D6;;margin-left: 10px;" slot="reference" class="el-icon-warning-outline"></i>
                </el-popover>
              </h2>
              <p style="cursor: pointer;" @click="jump_all_num" v-loading="loading10">
                {{AppAllNum}}
              </p>
            </div>
            <img src="../../mobile_static/public/image/工作台，笔记本，手机.png" alt="">
            <div class="AppTotal-left_right"></div>
          </div>
          <div class="AppTotal-right">
            <div class="AppTotal-right_left">
              <h2>APP类型占比 <el-popover placement="top-start" width="200" trigger="hover"
                  content="四种APP类型的占比，鼠标移到环形图可查看具体数值。">
                  <i style="color:#4583D6;;margin-left: 10px;" slot="reference" class="el-icon-warning-outline"></i>
                </el-popover>
              </h2>
              <table v-loading="loading11">
                <tr>
                  <td class="push-top"><span class="span"></span><span>iPhone</span>：{{AppType[1]}}</td>
                  <td class="push-down-two"><span class="span"></span><span>iPad</span>：{{AppType[0]}}</td>
                </tr>
                <tr>
                  <td class="push-down"><span class="span"></span><span>Android</span>：{{AppType[2]}}</td>
                  <td class="push-down-three"><span class="span"></span><span>其他</span>：{{AppType[3]}}</td>
                </tr>
              </table>
            </div>
            <div class="AppTotal-right_right" id="AppStatisticalBox" v-loading="loading11"></div>
          </div>
        </div>
      </div>
      <!-- APP新增趋势 -->
      <div class="companSselfBuiltAppTrend" v-show="isSelect == 3">
        <div class="left">
          <div class="left-bar">
            <h2>APP新增趋势
              <el-popover placement="top-start" width="200" trigger="hover" content="统计一段时间内，各企业新增APP的数量。">
                <i style="color:rgb(89,160,255);;margin-left: 10px;" slot="reference"
                  class="el-icon-warning-outline"></i>
              </el-popover>
            </h2>
            <div class="date-box">

              <el-date-picker v-model="companSselfBuiltAppTrendValue1" type="year" placeholder="请选择开始日期"
                @change="DateChange_three_one">
              </el-date-picker>
              至
              <el-date-picker v-model="companSselfBuiltAppTrendValue2" type="year" placeholder="请选择结束日期"
                @change="DateChange_three_two">
              </el-date-picker>
            </div>
          </div>
          <div id="companSselfBuiltAppTrendBox" v-loading="loading12"></div>
        </div>
        <div class="right">
          <div class="right-top">
            <h2>新增APP数</h2>
            <span v-loading="loading13">{{AppAllNumTwo}}</span>
          </div>
          <div class="right-down" style="position: relative;" v-loading="loading14">
            <!-- <p style="font-size: 16px;font-weight: 600;position: absolute;white-space: normal;left: 20px;top:15px;">
              工作台应用类型占比</p> -->
            <!-- <div class="right-down-left">
              <div class="push-top"><span></span>iPhone：{{AppTypeTwo[1]}}</div>
              <div class="push-down"><span></span>Android：{{AppTypeTwo[2]}}</div>
              <div class="push-down-two"><span></span>iPad：{{AppTypeTwo[0]}}</div>
              <div class="push-down-three"><span></span>其他：{{AppTypeTwo[3]}}</div>
            </div> -->
            <div class="right-down-right" id="groupSeriesPushTwoBox"></div>
          </div>
        </div>
      </div>
      <!-- APP下载明细表 -->
      <div class="AppDownloadTable newAddApplication" v-show="isSelect == 3">
        <div class="table-bar search-box-list" style="padding: 10px;">
          <h2>APP下载明细表</h2>
          <ul>
            <li :class="{'selected':isAppDownloadTableSelect == 1}" @click="isAppDownloadTableSelect=1">近7天</li>
            <li :class="{'selected':isAppDownloadTableSelect == 2}" @click="isAppDownloadTableSelect=2">近30天</li>
            <li :class="{'selected':isAppDownloadTableSelect == 3}" @click="isAppDownloadTableSelect=3">全年</li>
            <li :class="{'selected':isAppDownloadTableSelect == 4}" @click="isAppDownloadTableSelect=4">累计</li>
          </ul>
          <div class="select-box">
            <el-select style="position:relative;top:3px;" v-model="AppDownloadTableValue" filterable placeholder="请选择" @change="search4" :disabled="selectValue!=''">
              <el-option v-for="item in AppDownloadTableOptions" :key="item.g0departmentcode"
                :label="item.g0departmentname" :value="item.g0departmentcode">
              </el-option>
            </el-select>
          </div>
          <div class="search-box">
            <el-input style="position:relative;top:3px;" prefix-icon="el-icon-search" v-model="AppDownloadTableSearchValue" placeholder="按APP名搜索"
              @change="search4">
            </el-input>
          </div>
          <div class="downloadBox">
            <el-button type="primary" @click="AppDownload">下载</el-button>
          </div>
        </div>
        <!-- 表格 -->
        <div class="table-box">
          <el-table :data="AppDownloadTableTableData" stripe style="width: 100%" @sort-change="sortChange2"
            v-loading="loading15" border height="350"
            :header-cell-style="{background: 'linear-gradient(180deg, #FAFAFA 0%, #F1F1F1 100%)',fontSize:'16px',fontWeight:'bold',color:'#000000'}">
            <el-table-column prop="g0softwarename" label="APP名称" min-width="200">
            </el-table-column>
            <el-table-column prop="g0platformtype" label="类型" min-width="120">
            </el-table-column>
            <el-table-column prop="g0softwaretypename" label="APP类型" min-width="120">
            </el-table-column>
            <el-table-column prop="g0enterprise_name" label="所属企业" min-width="200">
            </el-table-column>
            <el-table-column sortable prop="k0downloadcnt" label="下载次数" min-width="120">
            </el-table-column>
          </el-table>
        </div>
        <!-- 分页 -->
        <div class="paging-box">
          <div class="block">
            <el-pagination @size-change="handleSizeChange_four" @current-change="handleCurrentChange_four"
              :current-page="page_four" :page-sizes="[10, 20, 30, 40]" :page-size="size_four"
              layout="total, sizes, prev, pager, next, jumper" :total="length_four">
            </el-pagination>
          </div>
        </div>
      </div>
    </div>
  </div>
</body>

</html>
<script type="module">
  import { axiosPostRequst, axiosGetRequst } from "../../mobile_static/axios/axios.config.js"
  import { postThreeId, getThreeIdDownload, postAppId, getAppDownload, RequestJurisdictionAll, checkAllAuth } from '../../mobile_static/axios/axios.config.js'
  import { thousandFilter } from '../../mobile_static/tool/formatFiltering.js';

  new Vue({
    el: "#app",
    data() {
      return {
        loading1: false,
        loading2: false,
        loading3: false,
        loading4: false,
        loading5: false,
        loading6: false,
        loading7: false,
        loading8: false,
        loading9: false,
        loading10: false,
        loading11: false,
        loading12: false,
        loading13: false,
        loading14: false,
        loading15: false,

        selectValue: "",//搜索框的值
        selectOptions: [
          {
            value: "",
            label: "全部"
          },
          {
            value: "HEADQUARTERS",
            label: "总部"
          },
          {
            value: "oilRefining",
            label: "炼油销售有限公司"
          },
        ],
        isSelect: 1,//最上面选择栏选择值
        isAccessApplicationSelect: 1,
        isAppDownloadTableSelect: 4,
        echartsArr: {
          firstEcharts: '',
          secondEcharts: "",
          thirdEcharts: "",
          fourthEcharts: "",
          fifthEcharts: "",
          sixthEcharts: "",
          seventhEcharts: "",
          eighthEcharts: "",
          ninthEcharts: "",
        },
        options: [
          {
            value: 1,
            label: '自建应用企业'
          }, {
            value: 2,
            label: '未自建应用企业'
          }],
        value: 1,
        searchValue: "",
        tableData: [
          {
            enterpriseName: "总部",
            number: '100',
          },
          {
            enterpriseName: "胜利油田",
            number: '98',
          },
          {
            enterpriseName: "化工销售",
            number: '96',
          },
          {
            enterpriseName: "石油工程",
            number: '86',
          },
          {
            enterpriseName: "镇海炼化",
            number: '83',
          },
          {
            enterpriseName: "镇海炼化",
            number: '83',
          },
          {
            enterpriseName: "镇海炼化",
            number: '83',
          },
          {
            enterpriseName: "镇海炼化",
            number: '83',
          },
        ],
        // tableData_two: [],
        newAddApplicationValue: "",
        newAddApplicationValueOptions: [
          {
            value: '',
            label: '全部'
          },
          {
            value: 'HEADQUARTERS',
            label: '总部'
          },
          {
            value: 'lubricatingOil',
            label: '润滑油有限公司'
          },
          {
            value: 'chemical ',
            label: '化工销售有限公司'
          },
        ],
        newAddApplicationSearchValue: "",
        newAddApplicationTableData: [],
        accessApplicationTimeValue: "",
        accessApplicationSearchValue: "",
        accessApplicationTableData: [],
        // 请求组件统计分析数据
        TotalNumberOfComponentsUsed: 0,
        ComponentDiagram: [],
        componentStatisticsTableData: [
          {
            componentName: "设备调用组件",
            accounted: "45%",
            useNumber: "56"
          },
          {
            componentName: "报刊组件",
            accounted: "45%",
            useNumber: "56"
          },
          {
            componentName: "巡检组件",
            accounted: "45%",
            useNumber: "56"
          },
          {
            componentName: "日程安排组件",
            accounted: "45%",
            useNumber: "56"
          },
          {
            componentName: "单点登录组件",
            accounted: "45%",
            useNumber: "56"
          },
          {
            componentName: "单点登录组件",
            accounted: "45%",
            useNumber: "56"
          },
          {
            componentName: "设备调用组件",
            accounted: "45%",
            useNumber: "56"
          },
          {
            componentName: "报刊组件",
            accounted: "45%",
            useNumber: "56"
          },
          {
            componentName: "巡检组件",
            accounted: "45%",
            useNumber: "56"
          },
          {
            componentName: "日程安排组件",
            accounted: "45%",
            useNumber: "56"
          },
          {
            componentName: "单点登录组件",
            accounted: "45%",
            useNumber: "56"
          },
          {
            componentName: "单点登录组件",
            accounted: "45%",
            useNumber: "56"
          },
          {
            componentName: "设备调用组件",
            accounted: "45%",
            useNumber: "56"
          },
          {
            componentName: "报刊组件",
            accounted: "45%",
            useNumber: "56"
          },
          {
            componentName: "巡检组件",
            accounted: "45%",
            useNumber: "56"
          },
          {
            componentName: "日程安排组件",
            accounted: "45%",
            useNumber: "56"
          },
          {
            componentName: "单点登录组件",
            accounted: "45%",
            useNumber: "56"
          },
          {
            componentName: "单点登录组件",
            accounted: "45%",
            useNumber: "56"
          },
        ],
        companSselfBuiltAppTrendValue1: "",
        companSselfBuiltAppTrendValue2: "",
        AppDownloadTableSearchValue: "",
        AppDownloadTableValue: "",
        AppDownloadTableOptions: [
          {
            value: 'all',
            label: '全部'
          },
          {
            value: 'HEADQUARTERS',
            label: '总部'
          },
          {
            value: 'lubricatingOil',
            label: '润滑油有限公司'
          },
          {
            value: 'chemical ',
            label: '化工销售有限公司'
          },
        ],
        AppDownloadTableTableData: [
          {
            AppName: "总部移动应用",
            type: "企业自建",
            AppType: "iPhone",
            belongEnterprise: "总部",
            downloads: 586,
          },
          {
            AppName: "石化通",
            type: "平台客户端",
            AppType: "Android",
            belongEnterprise: "胜利油田",
            downloads: 543,
          },
          {
            AppName: "石化党建",
            type: "企业自建",
            AppType: "iPhone",
            belongEnterprise: "化工销售",
            downloads: 123,
          },
          {
            AppName: "石化商旅",
            type: "平台客户端",
            AppType: "Android",
            belongEnterprise: "石油工程",
            downloads: 35,
          },
          {
            AppName: "网络学院",
            type: "企业自建",
            AppType: "iPhone",
            belongEnterprise: "镇海炼化",
            downloads: 7,
          },
          {
            AppName: "石化商旅",
            type: "平台客户端",
            AppType: "Android",
            belongEnterprise: "石油工程",
            downloads: 35,
          }, {
            AppName: "石化商旅",
            type: "平台客户端",
            AppType: "Android",
            belongEnterprise: "石油工程",
            downloads: 35,
          }, {
            AppName: "石化商旅",
            type: "平台客户端",
            AppType: "Android",
            belongEnterprise: "石油工程",
            downloads: 35,
          }, {
            AppName: "石化商旅",
            type: "平台客户端",
            AppType: "Android",
            belongEnterprise: "石油工程",
            downloads: 35,
          },
        ],
        Total_app_apps: {},
        Total_app_apps_num: "",
        startDate1: "1900-01",
        endDate1: "3099-12",
        timeValue: "",
        New_trend_left: {
          g0createdtime: [], k0nums: []
        },
        New_trend_right: {
          k0nums: "", k0ziji_rate: "", k0grouppush_rate: ""
        },
        length_two: 0,
        page_two: 1,
        size_two: 10,
        length_three: 0,
        page_three: 1,
        size_three: 10,
        startDate2: "2019-01-01",
        endDate2: "2022-01-01",
        AppAllNum: "",
        AppAllNumTwo: "",
        AppType: [],
        AppTypeTwo: [],
        startDate3: '2020',
        endDate3: '2022',
        Enterprise_self_construction_trend: {
          g0year: [], k0newcreate: []
        },
        startDate4: '2016-01-01',
        endDate4: '2022-01-01',
        page_four: 1,
        size_four: 10,
        length_four: '',
        size: 10,
        page: 1,
        length: '',
        g0software_dept_enterprise_name: [],
        k0appnums: [],
        token: "",
        sortValue: 'DESC',
        sortValue2: 'DESC',
        DataFlag: 1,
        isshow: 1,
        // 用来判断tab栏是否被点击过
        flag_1: false, 
        flag_2: false,
        flag_3: false
      }
    },
    created() {
      if (sessionStorage.getItem('scrollTop')) {
        document.documentElement.scrollTop = sessionStorage.getItem('scrollTop') * 1
      }
      if (sessionStorage.getItem('isSelect')) {
        this.isSelect = sessionStorage.getItem('isSelect') * 1
      }
      //进入页面获取token做请求
      if (window.location.search) {
        this.token = window.location.search.slice(1).split("=")[1]
      } else {
        alert("页面访问失败")
        window.location.href = '../error/error.html'
      }
      
      let nowDate = new Date();

      this.endDate1 = `${nowDate.getFullYear()}-${this.ZeroComplement(nowDate.getMonth() + 1)}`
      this.startDate1 = `${nowDate.getFullYear() - 1}-${this.ZeroComplement(nowDate.getMonth() + 1)}`

      this.endDate4 = `${nowDate.getFullYear()}-${this.ZeroComplement(nowDate.getMonth() + 1)}-${this.ZeroComplement(nowDate.getDate())}`
      this.endDate2 = `${nowDate.getFullYear()}-${this.ZeroComplement(nowDate.getMonth() + 1)}-${this.ZeroComplement(nowDate.getDate())}`
      let date1 = new Date();
      //今天时间
      let time1 = date1.getFullYear() + "-" + this.ZeroComplement(date1.getMonth() + 1) + "-" + this.ZeroComplement(date1.getDate())
      let date2 = new Date(date1);
      date2.setDate(date1.getDate() + -7);
      //num是正数表示之后的时间，num负数表示之前的时间，0表示今天
      let time2 = date2.getFullYear() + "-" + this.ZeroComplement(date2.getMonth() + 1) + "-" + this.ZeroComplement(date2.getDate());
      this.startDate4 = '1949-01-01'
      this.startDate2 = time2

      if (sessionStorage.getItem('isAccessApplicationSelect')) {
        this.isAccessApplicationSelect = sessionStorage.getItem('isAccessApplicationSelect')
        this.startDate2 = JSON.parse(sessionStorage.getItem('Date_two'))[0]
        this.endDate2 = JSON.parse(sessionStorage.getItem('Date_two'))[1]
        if (this.isAccessApplicationSelect == 5) {
          this.accessApplicationTimeValue = [this.startDate2, this.endDate2]
        }
      }

      if (sessionStorage.getItem('isAppDownloadTableSelect')) {
        this.isAppDownloadTableSelect = sessionStorage.getItem('isAppDownloadTableSelect')
        this.startDate4 = JSON.parse(sessionStorage.getItem('Date_four'))[0]
        this.endDate4 = JSON.parse(sessionStorage.getItem('Date_four'))[1]
      }
      if (this.isSelect == 1) {
        if (!this.isshow) {
          let html = document.querySelector('html')
          let body = document.querySelector('body')
          let app = document.querySelector('#app')
        } else {
          let html = document.querySelector('html')
          let body = document.querySelector('body')
          let app = document.querySelector('#app')
        }
      }

    },
    mounted() {
      checkAllAuth({
        identityToken: this.token,
        platformFlag: '1'
      }).then(res => {
        const response = JSON.parse(res.data.msg)
        if (response.status === '1') {
          //携带token做请求
          RequestJurisdictionAll({
            identityToken: this.token,
            platformFlag: ""
          }).then(res => {
            if (res.data.code == 200) {
              res = JSON.parse(res.data.msg);
              // console.log(res);
              sessionStorage.setItem('codeAll', JSON.stringify(res.data))

              this.newAddApplicationValueOptions = res.data
              this.AppDownloadTableOptions = res.data
              this.selectOptions = res.data
              if (sessionStorage.getItem("code")) {
                this.selectValue = sessionStorage.getItem("code")
                this.DataFlag = 2
              } else {
                this.selectValue = this.selectOptions[0].g0departmentcode
              }
              if (sessionStorage.getItem("code3")) {
                this.AppDownloadTableValue = sessionStorage.getItem("code3")
              } else {
                this.AppDownloadTableValue = this.selectValue
              }
              if (this.selectValue != '') {
                this.isshow = false
              } else {
                this.isshow = true
              }
              this.newAddApplicationValue = this.selectValue
              if (this.isSelect == 1) {
                this.ThreeBoxes();
                this.RankingAndSelfBuilt();
                this.RankingAndSelfBuilt_two()
                this.NewTrendLeft();
                this.NewTrendRight();
                this.NewDetailsOfWorkbench();
                this.WorkbenchAccessDetails();
              } else if (this.isSelect == 2) {
                this.ComponentStatistics()
                this.ComponentStatisticsAll()
              } else {
                this.TotalApps();
                this.TotalApps_two();
                this.ProportionOfAPPTypes();
                this.ProportionOfAPPTypes_two();
                this.AppNewTrend()
                this.AppDownloadDetails()
              }
              this.jump();
            } else {
              alert("token失效")
              window.location.href = '../error/error.html'
            }
          })
        } else {
          alert("没有访问权限")
          window.location.href = '../error/error.html'
        }
      })
   
      window.addEventListener("resize", () => {
        this.echartsResize()
      });

    },
    watch: {
      isSelect(val) {
        let html = document.querySelector('html')
        let body = document.querySelector('body')
        let app = document.querySelector('#app')
        if (val == 1 && !this.flag_1) {
          this.ThreeBoxes();
          this.RankingAndSelfBuilt();
          this.RankingAndSelfBuilt_two()
          this.NewTrendLeft();
          this.NewTrendRight();
          this.NewDetailsOfWorkbench();
          this.WorkbenchAccessDetails();
        } else if (val == 2 && !this.flag_2) {
          this.ComponentStatistics()
          this.ComponentStatisticsAll()
        } else if (val == 3 && !this.flag_3) {
          this.TotalApps();
          this.TotalApps_two();
          this.ProportionOfAPPTypes();
          this.ProportionOfAPPTypes_two();
          this.AppNewTrend()
          this.AppDownloadDetails()
        }
        //以下内容需要写在引入的页面

        $(window.parent.document).find("iframe").load(function () {
          var main = $(window.parent.document).find("iframe");
          var mainheight = $(document).height() + 30;
          main.height(html.style.height.slice(0, -2) * 1);
        });
        sessionStorage.setItem('isSelect', this.isSelect)
        // window.top.postMessage(document.body.scrollHeight, "*");
      },
      isAccessApplicationSelect(val) {
        this.page_three = 1
        let nowDate = new Date();
        if (val != 5) {
          this.endDate2 = `${nowDate.getFullYear()}-${this.ZeroComplement(nowDate.getMonth() + 1)}-${this.ZeroComplement(nowDate.getDate())}`
        }

        if (val === 1) {
          this.accessApplicationTimeValue = []
          let date1 = new Date();
          //今天时间
          let time1 = date1.getFullYear() + "-" + this.ZeroComplement(date1.getMonth() + 1) + "-" + this.ZeroComplement(date1.getDate())
          let date2 = new Date(date1);
          date2.setDate(date1.getDate() + -7);
          //num是正数表示之后的时间，num负数表示之前的时间，0表示今天
          let time2 = date2.getFullYear() + "-" + this.ZeroComplement(date2.getMonth() + 1) + "-" + this.ZeroComplement(date2.getDate());
          this.startDate2 = time2
        } else if (val === 2) {
          this.accessApplicationTimeValue = []
          let day_30 = new Date().setMonth((new Date().getMonth() - 1));    //日期是30天前的对应时间戳
          day_30 = new Date(day_30);       //转换成标准时间
          let y = day_30.getFullYear();    //年
          let m = day_30.getMonth() + 1;    //月
          let d = day_30.getDate();        //日
          if (m < 10) {
            m = '0' + m;
          }
          if (d < 10) {
            d = '0' + d;
          }
          this.startDate2 = y + "-" + m + "-" + d
        } else if (val === 3) {
          this.accessApplicationTimeValue = []
          this.startDate2 = nowDate.getFullYear() + "-01-01"
        }
        this.WorkbenchAccessDetails()
      },
      isAppDownloadTableSelect(val) {
        let nowDate = new Date();
        this.endDate4 = `${nowDate.getFullYear()}-${this.ZeroComplement(nowDate.getMonth() + 1)}-${this.ZeroComplement(nowDate.getDate())}`
        if (val === 1) {
          let date1 = new Date();
          //今天时间
          let time1 = date1.getFullYear() + "-" + this.ZeroComplement(date1.getMonth() + 1) + "-" + this.ZeroComplement(date1.getDate())
          let date2 = new Date(date1);
          date2.setDate(date1.getDate() + -7);
          //num是正数表示之后的时间，num负数表示之前的时间，0表示今天
          let time2 = date2.getFullYear() + "-" + this.ZeroComplement(date2.getMonth() + 1) + "-" + this.ZeroComplement(date2.getDate());
          this.startDate4 = time2
        } else if (val === 2) {
          let day_30 = new Date().setMonth((new Date().getMonth() - 1));    //日期是30天前的对应时间戳
          day_30 = new Date(day_30);       //转换成标准时间
          let y = day_30.getFullYear();    //年
          let m = day_30.getMonth() + 1;    //月
          let d = day_30.getDate();        //日
          if (m < 10) {
            m = '0' + m;
          }
          if (d < 10) {
            d = '0' + d;
          }
          this.startDate4 = y + "-" + m + "-" + d
        } else if (val === 3) {
          this.startDate4 = nowDate.getFullYear() + "-01-01"
        } else if (val === 4) {
          this.startDate4 = "1949-01-01"
        }
        this.AppDownloadDetails()
      }
    },
    methods: {
      scroll_one() {
        this.isSelect = 1
        window.scrollTo(0,0)
        sessionStorage.setItem('isSelect', this.isSelect)
        // document.documentElement.scrollTop = 0
      },
      scroll_two() {
        this.isSelect = 2
        window.scrollTo(0,0)
        sessionStorage.setItem('isSelect', this.isSelect)
        // document.documentElement.scrollTop = 2040
      },
      scroll_three() {
        this.isSelect = 3
        window.scrollTo(0,0)
        sessionStorage.setItem('isSelect', this.isSelect)
        // if (this.isshow) {
        //   document.documentElement.scrollTop = 2505
        // } else {
        //   document.documentElement.scrollTop = 1583
        // }
      },
      //监听页面变化
      // handleScroll(val) {
      //   let scrollTop = window.scrollY || window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
      //   // console.log(scrollTop);
      //   if (this.isshow) {
      //     if (scrollTop >= 0 && scrollTop < 2040) {
      //       this.isSelect = 1
      //     } else if (scrollTop >= 2040 && scrollTop < 2505) {
      //       this.isSelect = 2
      //     } else {
      //       this.isSelect = 3
      //     }
      //   } else {
      //     let html = document.querySelector('html')
      //     let body = document.querySelector('body')
      //     let app = document.querySelector('#app')
      //     html.style.height = 2810 + 'px'
      //     body.style.height = 2810 + 'px'
      //     app.style.height = 2810 + 'px'
      //     if (scrollTop >= 0 && scrollTop < 1583) {
      //       this.isSelect = 1
      //     } else {
      //       this.isSelect = 3
      //     }
      //   }
      // },
      //搜索过滤
      search1() {
        this.page = 1
        this.RankingAndSelfBuilt()
      },
      search2() {
        this.page_two = 1
        this.NewDetailsOfWorkbench()
      },
      search3() {
        this.page_three = 1
        this.WorkbenchAccessDetails()
      },
      search4() {
        this.page_four = 1
        this.AppDownloadDetails()
      },

      //累计访问排序
      sortChange(val) {
        if (val.order == 'ascending') {
          this.sortValue = 'ASC'
        } else if (val.order == 'descending') {
          this.sortValue = 'DESC'
        }
        this.WorkbenchAccessDetails()
      },
      //app下载排序 
      sortChange2(val) {
        if (val.order == 'ascending') {
          this.sortValue2 = 'ASC'
        } else if (val.order == 'descending') {
          this.sortValue2 = 'DESC'
        }
        this.AppDownloadDetails()
      },
      //下拉框改变调用
      downChange() {
        this.AppDownloadTableValue = this.selectValue
        this.newAddApplicationValue = this.selectValue
        this.flag_1 = false
        this.flag_2 = false
        this.flag_3 = false
        if (this.selectValue) {
          this.DataFlag = 2
          this.isshow = false
          if (this.isSelect == 2) {
            this.isSelect = 1
            return
          }
          // this.ThreeBoxes()
          // this.NewTrendLeft()
          // this.NewTrendRight()
          // this.WorkbenchAccessDetails()
          // this.ComponentStatistics()
          // this.ComponentStatisticsAll()
          // this.TotalApps()
          // this.TotalApps_two();
          // this.ProportionOfAPPTypes();
          // this.ProportionOfAPPTypes_two();
          // this.AppNewTrend()
          // this.AppDownloadDetails()
          // this.NewDetailsOfWorkbench()
        } else {
          this.DataFlag = 1
          this.isshow = true
          // this.ThreeBoxes()
          // this.RankingAndSelfBuilt()
          // this.RankingAndSelfBuilt_two()
          // this.NewTrendLeft()
          // this.NewTrendRight()
          // this.WorkbenchAccessDetails()
          // this.ComponentStatistics()
          // this.ComponentStatisticsAll()
          // this.TotalApps()
          // this.TotalApps_two();
          // this.ProportionOfAPPTypes();
          // this.ProportionOfAPPTypes_two();
          // this.AppNewTrend()
          // this.AppDownloadDetails()
          // this.NewDetailsOfWorkbench()
        }
        if (this.isSelect == 1 && !this.flag_1) {
          this.ThreeBoxes();
          this.RankingAndSelfBuilt();
          this.RankingAndSelfBuilt_two()
          this.NewTrendLeft();
          this.NewTrendRight();
          this.NewDetailsOfWorkbench();
          this.WorkbenchAccessDetails();
        } else if (this.isSelect == 2 && !this.flag_2) {
          this.ComponentStatistics()
          this.ComponentStatisticsAll()
        } else if (this.isSelect == 3 && !this.flag_3) {
          this.TotalApps();
          this.TotalApps_two();
          this.ProportionOfAPPTypes();
          this.ProportionOfAPPTypes_two();
          this.AppNewTrend()
          this.AppDownloadDetails()
        }

      },
      //工作台应用新增明细表分页
      handleSizeChange_two(val) {
        this.size_two = val
        this.NewDetailsOfWorkbench()
      },
      handleCurrentChange_two(val) {
        this.page_two = val
        this.NewDetailsOfWorkbench()
      },
      //工作台应用访问明细表分页
      handleSizeChange_three(val) {
        this.size_three = val
        this.WorkbenchAccessDetails()
      },
      handleCurrentChange_three(val) {
        this.page_three = val
        this.WorkbenchAccessDetails()
      },
      handleSizeChange(val) {
        this.size = val
        this.RankingAndSelfBuilt()
      },
      handleCurrentChange(val) {
        this.page = val
        this.RankingAndSelfBuilt()
      },
      handleSizeChange_four(val) {
        this.size_four = val
        this.AppDownloadDetails()
      },
      handleCurrentChange_four(val) {
        this.page_four = val
        this.AppDownloadDetails()
      },
      echartsResize() {
        for (let key in this.echartsArr) {
          this.echartsArr[key].resize()
        }
        // this.echartsArr.myChart.resize()
      },
      //工作台应用趋势模块日期改变时调用
      DateChange_one() {
        if (this.timeValue) {
          this.startDate1 = this.timeValue[0]
          this.endDate1 = this.timeValue[1]
        } else {
          let nowDate = new Date();
          this.endDate1 = `${nowDate.getFullYear()}-${this.ZeroComplement(nowDate.getMonth() + 1)}`
          this.startDate1 = `${nowDate.getFullYear() - 1}-${this.ZeroComplement(nowDate.getMonth() + 1)}`
        }
        this.NewTrendLeft()
        this.NewTrendRight()
      },
      //工作台应用访问明细表日期改变调用
      DateChange_two() {
        this.isAccessApplicationSelect = 5
        if (this.accessApplicationTimeValue) {
          this.startDate2 = this.accessApplicationTimeValue[0]
          this.endDate2 = this.accessApplicationTimeValue[1]
        } else {
          this.isAccessApplicationSelect = 1
        }
        this.WorkbenchAccessDetails()
      },
      //企业自建APP新增趋势日期第一个框
      DateChange_three_one() {
        if (this.companSselfBuiltAppTrendValue1) {
          this.startDate3 = this.companSselfBuiltAppTrendValue1.getFullYear()
          this.AppNewTrend()
          this.TotalApps_two();
          this.ProportionOfAPPTypes_two();
        } else if (!this.companSselfBuiltAppTrendValue1) {
          this.startDate3 = '2020'
          this.AppNewTrend()
          this.TotalApps_two();
          this.ProportionOfAPPTypes_two();
        }
      },
      //企业自建APP新增趋势日期第二个框
      DateChange_three_two() {
        if (this.companSselfBuiltAppTrendValue2) {
          this.endDate3 = this.companSselfBuiltAppTrendValue2.getFullYear()
          this.AppNewTrend()
          this.TotalApps_two();
          this.ProportionOfAPPTypes_two();
        } else if (!this.companSselfBuiltAppTrendValue2) {
          this.endDate3 = '2022'
          this.AppNewTrend()
          this.TotalApps_two();
          this.ProportionOfAPPTypes_two();
        }
      },
      All_num() {
        window.location.href = './allApplicationInformation.html?code=' + this.selectValue
        sessionStorage.setItem('allApplicationInformationCode', this.selectValue)
        sessionStorage.setItem('code', this.selectValue)
        sessionStorage.setItem('isSelect', this.isSelect)
        sessionStorage.setItem('jurisdiction', "1")
      },
      // 表格跳转页面
      jump() {



        // 跳到组件使用情况页
        let acomponentStatisticsArr = document.getElementsByClassName("el-table_4_column_15")
        setTimeout(() => {
          for (let i = 0; i < acomponentStatisticsArr.length; i++) {
            acomponentStatisticsArr[i].addEventListener("click", () => {
              sessionStorage.setItem('scrollTop', document.documentElement.scrollTop)
              sessionStorage.setItem('isSelect', this.isSelect)
              window.location.href = './componentUsage.html?code=' + this.componentStatisticsTableData[i - 1].g0component_code + '&name=' + this.componentStatisticsTableData[i - 1].g0component_name;
            })
          }
        })

      },
      //跳转总数
      jump_all_num() {
        window.location.href = './AppInformationTable.html?code=' + this.selectValue;
        sessionStorage.setItem('code', this.selectValue)
        sessionStorage.setItem('isSelect', this.isSelect)
        sessionStorage.setItem('jurisdiction', "1")
      },
      //请求最上面三个框
      ThreeBoxes() {
        this.loading1 = true
        postThreeId("gztyytjfx_zsmdsgk00", {
          pageSize: 10,
          pageNum: 1,
          g0DataFlag: this.DataFlag,
          g0enterpriseCode: this.selectValue,
        }).then(res => {
          this.loading1 = false
          res = JSON.parse(res.data.msg);
          // console.log(res, "请求最上面三个框成功");
          if (res.total) {
            this.Total_app_apps = res.data[0]
            this.Total_app_apps.k0grouppush = thousandFilter(this.Total_app_apps.k0grouppush)
            this.Total_app_apps.k0ziji = thousandFilter(this.Total_app_apps.k0ziji)
            this.Total_app_apps.k0zijenterprise = thousandFilter(this.Total_app_apps.k0zijenterprise)
            this.Total_app_apps.k0weizijenterprise = thousandFilter(this.Total_app_apps.k0weizijenterprise)
          } else {
            this.Total_app_apps = {
              k0proromotion: '0%', k0grouppush: 0, k0probuiltenterprises: '0%', k0ziji: 0,
              k0probuiltapplications: '0%', k0zijenterprise: 0, k0notproromotion: '0%', k0weizijenterprise: 0
            }
          }


          this.Total_app_apps_num = 0
          if (res.total != 0) {
            for (let i = 0; i < res.data.length; i++) {
              this.Total_app_apps_num += res.data[i].k0applications
            }
            this.Total_app_apps_num = thousandFilter(this.Total_app_apps_num)
          } else {
            this.Total_app_apps_num = 0
          }
          let workbenchApplicationDom = document.getElementById('workbench-cardTwo_right');
          this.echartsArr.firstEcharts = echarts.init(workbenchApplicationDom);
          // workbenchApplication && this.echartsArr.firstEcharts.setOption(workbenchApplication);
          this.echartsArr.firstEcharts.setOption({
            tooltip: {
              trigger: 'item',
            },
            color: ['#F7B500', '#2FC25B'],
            series: [{
              name: '工作台应用类型占比',
              type: 'pie',
              radius: ['40%', '70%'],
              label: {
                show: false,
                position: 'center'
              },
              labelLine: {
                show: false
              },
              data: [{
                value: res.data[0].k0grouppush.replace(/,/g, ''),
                name: '集团统推'
              },
              {
                value: res.data[0].k0ziji.replace(/,/g, ''),
                name: '企业自建'
              },
              ]
            }]
          });

          if (this.isshow) {
            let companySelfbuiltDom = document.getElementById('workbench-cardThree_right');
            this.echartsArr.secondEcharts = echarts.init(companySelfbuiltDom);
            // companySelfbuilt && this.echartsArr.secondEcharts.setOption(companySelfbuilt);
            this.echartsArr.secondEcharts.setOption({
              tooltip: {
                trigger: 'item',
              },
              color: ['#F7B500', '#1890FF'],
              series: [{
                name: '企业自建占比',
                type: 'pie',
                radius: ['40%', '70%'],
                label: {
                  show: false,
                  position: 'center'
                },
                labelLine: {
                  show: false
                },
                data: [{
                  value: res.data[0].k0zijenterprise,
                  name: '自建应用企业'
                },
                {
                  value: res.data[0].k0weizijenterprise,
                  name: '未自建应用企业'
                },
                ]
              }]
            });
          }

        })
      },
      //请求工作台排行和列表
      RankingAndSelfBuilt() {
        this.loading3 = true
        postThreeId("gztyytjfx_phhyylbhzb00", {
          pageSize: this.size,
          pageNum: this.page,
          startDate: "1900-01-01",
          endDate: "2100-01-01",
          g0DataFlag: this.value,
          g0enterpriseCode: this.selectValue,
          g0enterpriseName: this.searchValue
        }).then(res => {
          this.loading3 = false
          res = JSON.parse(res.data.msg);
          // console.log(res, "请求工作台排行和列表成功");
          this.length = res.total
          this.tableData = []
          if (this.value == 1) {
            if (res.total) {
              this.tableData = res.data
            } else {
              this.tableData = []
            }
          } else {
            if (res.total) {
              for (let i = 0; i < res.data.length; i++) {
                this.tableData.push({ g0enterprise_name: res.data[i].g0enterprise_name, k0appnums: "" })
              }
            } else {
              this.tableData = []
            }
          }
          // 跳到自建应用企业列表
          let enterpriseBuiltWorkbenchArr = document.getElementsByClassName("el-table_1_column_2")
          setTimeout(() => {
            for (let i = 0; i < enterpriseBuiltWorkbenchArr.length; i++) {
              enterpriseBuiltWorkbenchArr[i].addEventListener("click", () => {
                sessionStorage.setItem('scrollTop', document.documentElement.scrollTop)
                sessionStorage.setItem('isSelect', this.isSelect)
                window.location.href = './enterpriseApplicationList.html?code=' + this.tableData[i - 1].g0enterprise_code + '&name=' + this.tableData[i - 1].g0enterprise_name;
              })
            }
          })

        })
      },
      RankingAndSelfBuilt_two() {
        this.loading2 = true
        postThreeId("gztyytjfx_phhyylbhzb00", {
          pageSize: this.size,
          pageNum: this.page,
          startDate: "1900-01-01",
          endDate: "2100-01-01",
          g0DataFlag: 1,
          g0enterpriseCode: this.selectValue,
        }).then(res => {
          this.loading2 = false
          res = JSON.parse(res.data.msg);
          // console.log(res, "请求工作台排行和列表成功");

          let arr = res.data.sort((a, b) => {
            return a.k0appnums - b.k0appnums
          })
          if (res.total) {
            this.g0software_dept_enterprise_name = []
            this.k0appnums = []
            for (let i = 0; i < arr.length; i++) {
              this.g0software_dept_enterprise_name.push(arr[i].g0enterprise_name)
              this.k0appnums.push(arr[i].k0appnums)
            }
          } else {
            this.g0software_dept_enterprise_name = []
            this.k0appnums = []
          }



          let enterpriseBuiltWorkbenchRankingDom = document.getElementById('accessListOne');
          this.echartsArr.thirdEcharts = echarts.init(enterpriseBuiltWorkbenchRankingDom);
          this.echartsArr.thirdEcharts.setOption({
            tooltip: {
              trigger: 'axis',
              axisPointer: {
                type: 'shadow'
              }
            },
            grid: {
              bottom: '3%',
              containLabel: true
            },
            color: ['#1890FF'],
            xAxis: {
              type: 'value',
              boundaryGap: [0, 0.01],
              show: false
            },
            yAxis: {
              axisLabel: {
                interval: 0,
                align: 'left',
                formatter: function (val) {
                  if (val.length > 8) {
                    return `${val.slice(0, 8)}...`
                  }
                  return val;
                }
              },
              offset: 140,
              type: 'category',
              data: this.g0software_dept_enterprise_name,
              axisTick: {
                show: false //不显示坐标轴刻度线
              },
              axisLine: {
                show: false, //不显示坐标轴线
              },
            },
            series: [{
              type: 'bar',
              data: this.k0appnums,
              barGap: '80%',
              /*多个并排柱子设置柱子之间的间距*/
              barCategoryGap: '30%',
              /*多个并排柱子设置柱子之间的间距*/
              label: {
                show: false, //不
                position: 'right'
              }
            }]
            // label: {
            //   show: true,
            //   position: 'inside',
            //   color: 'white',
            // },

          })
        })
      },
      //下载自建表
      download_oneself() {
        if (this.length > 50000) {
          this.$notify.error({
            title: '下载失败',
            message: "下载数据条数不能超过50000条",
          });
          return
        }
        this.loading3 = true
        getThreeIdDownload("gztyytjfx_phhyylbhzb00Export", {
          pageSize: this.length,
          pageNum: 1,
          startDate: "2000-01-01",
          endDate: "2023-01-01",
          g0DataFlag: this.value,
          g0enterpriseCode: this.selectValue,
          g0enterpriseName: this.searchValue
        }).then(res => {
          if (!res) {
            return
          }
          this.loading3 = false

          let url = window.URL.createObjectURL(res.data)
          let link = document.createElement("a")
          link.style.display = 'none'
          link.href = url
          link.setAttribute('download', '企业自建工作台应用列表.xlsx')
          document.body.appendChild(link)
          link.click()
        })
      },
      //请求新增趋势左边柱状图
      NewTrendLeft() {
        this.loading4 = true
        postThreeId("gztyyxzqs_zbdzzt00", {
          pageSize: 100,
          pageNum: 1,
          startDate: this.startDate1,
          endDate: this.endDate1,
          g0enterpriseCode: this.selectValue,
        }).then(res => {
          if (!res) {
            return;
          }
          this.loading4 = false
          res = JSON.parse(res.data.msg);
          if (res.total == 0) {
            this.New_trend_left.g0createdtime = []
            this.New_trend_left.k0nums = []
          } else {
            this.New_trend_left.g0createdtime = []
            this.New_trend_left.k0nums = []
            for (let i = 0; i < res.data.length; i++) {
              this.New_trend_left.g0createdtime.push(res.data[i].g0createdtime)
              this.New_trend_left.k0nums.push(res.data[i].k0nums)
            }
          }

          let applicationTrendDom = document.getElementById('applicationTrendBox');
          this.echartsArr.fourthEcharts = echarts.init(applicationTrendDom);
          // applicationTrend && this.echartsArr.fourthEcharts.setOption(applicationTrend);
          this.echartsArr.fourthEcharts.setOption({
            xAxis: {
              type: 'category',
              data: this.New_trend_left.g0createdtime
            },
            yAxis: {
              type: 'value'
            },
            tooltip: {
              trigger: "item",
            },
            color: ['#2FC25B'],
            series: [{
              data: this.New_trend_left.k0nums,
              type: 'bar',
              barGap: '80%',
              label: {
                show: false,
                position: 'top'
              },
              /*多个并排柱子设置柱子之间的间距*/
              barCategoryGap: '60%',
              /*多个并排柱子设置柱子之间的间距*/
            }]
          });
        })
      },
      //请求新增趋势右边
      NewTrendRight() {
        this.loading5 = true
        postThreeId("gztyyxzqs2_ybdslhzxjdzb00", {
          pageSize: 10,
          pageNum: 1,
          startDate: this.startDate1,
          endDate: this.endDate1,
          g0enterpriseCode: this.selectValue,
        }).then(res => {
          if (!res) {
            return;
          }
          this.loading5 = false
          res = JSON.parse(res.data.msg);
          // console.log(res, "请求新增趋势右边成功");
          if (res.total == 0 || res.data[0].k0nums == null) {
            this.New_trend_right.k0nums = 0
            this.New_trend_right.k0ziji_rate = '0%'
            this.New_trend_right.k0grouppush_rate = '0%'
          } else {
            this.New_trend_right.k0nums = res.data[0].k0nums
            this.New_trend_right.k0nums = thousandFilter(this.New_trend_right.k0nums)
            this.New_trend_right.k0ziji_rate = res.data[0].k0ziji_rate
            this.New_trend_right.k0grouppush_rate = res.data[0].k0grouppush_rate
          }

          let groupSeriesPushDom = document.getElementById('groupSeriesPush');
          this.echartsArr.fifthEcharts = echarts.init(groupSeriesPushDom);
          // groupSeriesPush && this.echartsArr.fifthEcharts.setOption(groupSeriesPush);
          this.echartsArr.fifthEcharts.setOption({
            tooltip: {
              trigger: 'item',
            },
            color: ['#F7B500', '#2FC25B'],
            series: [{
              name: '工作台应用类型占比',
              type: 'pie',
              radius: ['40%', '70%'],
              label: {
                normal: {
                  show: true,
                  position: 'center',
                  color: '#4c4a4a',
                  formatter: '总数' + '\n\r' + this.New_trend_right.k0nums,
                  rich: {
                    total: {
                      fontSize: 12,
                      fontFamily: "微软雅黑",
                      color: '#454c5c'
                    },
                    active: {
                      fontFamily: "微软雅黑",
                      fontSize: 20,
                      color: '#6c7a89',
                      lineHeight: 30,
                    },
                  }
                },
              },
              labelLine: {
                show: false
              },
              data: [{
                value: res.data[0].k0grouppush,
                name: '集团统推'
              },
              {
                value: res.data[0].k0ziji,
                name: '企业自建'
              },
              ]
            }]
          });
        })
      },
      //请求工作台新增明细
      NewDetailsOfWorkbench() {
        this.loading6 = true
        postThreeId("zjsyqkmxb_gztxzmxyymxb_00", {
          pageSize: this.size_two,
          pageNum: this.page_two,
          g0moduleName: this.newAddApplicationSearchValue,
          g0enterpriseCode: this.newAddApplicationValue,
        }).then(res => {
          this.loading6 = false
          res = JSON.parse(res.data.msg);
          // console.log(res, "请求工作台新增明细成功");
          if (res.total) {
            this.newAddApplicationTableData = res.data
          } else {
            this.newAddApplicationTableData = []
          }
          this.length_two = res.total
        })
      },
      //工作台新增明细下载
      download() {
        if (this.length_two > 50000) {
          this.$notify.error({
            title: '下载失败',
            message: "下载数据条数不能超过50000条",
          });
          return
        }
        this.loading6 = true
        getThreeIdDownload("zjsyqkmxb_gztxzmxyymxb_00Export", {
          pageSize: this.length_two,
          pageNum: 1,
          g0moduleName: this.newAddApplicationSearchValue,
          g0enterpriseCode: this.newAddApplicationValue,
        }).then(res => {
          if (!res) {
            return
          }
          this.loading6 = false

          let url = window.URL.createObjectURL(res.data)
          let link = document.createElement("a")
          link.style.display = 'none'
          link.href = url
          link.setAttribute('download', '工作台应用新增明细表.xlsx')
          document.body.appendChild(link)
          link.click()
        })
      },
      //请求工作台访问明细
      WorkbenchAccessDetails() {
        this.loading7 = true
        postThreeId("gztyyfwmxb_hz00", {
          pageSize: this.size_three,
          pageNum: this.page_three,
          startDate: this.startDate2,
          endDate: this.endDate2,
          g0moduleName: this.accessApplicationSearchValue,
          orderType: this.sortValue,
          g0enterpriseCode: this.selectValue,
        }).then(res => {
          this.loading7 = false
          res = JSON.parse(res.data.msg);
          // console.log(res, "请求工作台访问明细成功");
          if (res.total) {
            this.accessApplicationTableData = res.data
          } else {
            this.accessApplicationTableData = []
          }
          this.length_three = res.total
          // 跳到累计访问人次明细
          let accessApplicationArr = document.getElementsByClassName("el-table_3_column_12")
          setTimeout(() => {
            for (let i = 0; i < accessApplicationArr.length; i++) {
              accessApplicationArr[i].addEventListener("click", () => {
                sessionStorage.setItem('scrollTop', document.documentElement.scrollTop)
                sessionStorage.setItem('isAccessApplicationSelect', this.isAccessApplicationSelect)
                sessionStorage.setItem('code', this.selectValue)
                sessionStorage.setItem('isSelect', this.isSelect)
                if (this.isAccessApplicationSelect == 5) {
                  sessionStorage.setItem('Date_two', JSON.stringify(this.accessApplicationTimeValue))
                } else {
                  sessionStorage.setItem('Date_two', JSON.stringify([this.startDate2, this.endDate2]))
                }

                window.location.href = './cumulativeNumberOfVisits.html?code=' + this.accessApplicationTableData[i - 1].g0software_dept_enterprise_code + "&class=" + this.accessApplicationTableData[i - 1].g0mduleclass +
                  "&name=" + this.accessApplicationTableData[i - 1].g0mdulename + "&down=" + this.isAccessApplicationSelect + "&startDate=" + this.startDate2 + "&endDate=" + this.endDate2 + '&moduleCode=' +
                  this.accessApplicationTableData[i - 1].g0module_type_code + '&typeCode=' + this.accessApplicationTableData[i - 1].g0app_type_code;
              })
            }
            this.flag_1 = true
          })
        })
      },
      //请求组件统计分析数据
      ComponentStatistics() {
        this.loading8 = true
        postThreeId("zjtjfx00", {
          pageSize: 100,
          pageNum: 1,
          g0enterpriseCode: this.selectValue,
        }).then(res => {
          if (!res) {
            return;
          }
          this.loading8 = false
          res = JSON.parse(res.data.msg);
          // console.log(res);
          this.componentStatisticsTableData = res.data
          this.ComponentDiagram = []
          for (let i = 0; i < this.componentStatisticsTableData.length; i++) {
            this.ComponentDiagram.push({ value: this.componentStatisticsTableData[i].k0use_cnt, name: this.componentStatisticsTableData[i].g0component_name })
          }
          let componentStatisticsDom = document.getElementById('componentStatisticsBox');
          this.echartsArr.sixthEcharts = echarts.init(componentStatisticsDom);
          // componentStatistics && this.echartsArr.sixthEcharts.setOption({
          this.echartsArr.sixthEcharts.setOption({
            tooltip: {
              trigger: 'item'
            },
            // legend: {},
            series: [{
              // name: '组件使用情况分布',
              type: 'pie',
              radius: '50%',
              center: ['50%', '50%'],
              label: {
                show: true,
                fontSize: 10
              },
              data: this.ComponentDiagram,
              emphasis: {
                itemStyle: {
                  shadowBlur: 10,
                  shadowOffsetX: 0,
                  shadowColor: 'rgba(0, 0, 0, 0.5)'
                }
              }
            }]
          });
        })
      },
      // 请求组件统计分析-累计使用次数
      ComponentStatisticsAll() {
        this.loading9 = true
        postThreeId("zjtjfx_ljsycs00", {
          pageSize: 10,
          pageNum: 1,
          g0enterpriseCode: this.selectValue,
        }).then(res => {
          if (!res) {
            return;
          }
          this.loading9 = false
          res = JSON.parse(res.data.msg);
          // console.log(res, "请求组件统计分析-累计使用次数数据成功");
          this.TotalNumberOfComponentsUsed = res.data[0].k0total_use_cnt
          this.flag_2 = true
        })
      },
      //请求App总数
      TotalApps() {
        this.loading10 = true
        postAppId("dbjdbyc_xzappzgs00", {
          pageSize: 10,
          pageNum: 1,
          g0enterpriseCode: this.selectValue,
        }).then(res => {
          this.loading10 = false
          res = JSON.parse(res.data.msg);
          // console.log(res, "请求App总数成功");
          this.AppAllNum = res.data[0].k0appcount
          this.AppAllNum = thousandFilter(this.AppAllNum)
        })
      },//请求App总数
      TotalApps_two() {
        this.loading13 = true
        postAppId("dbjdbyc_xzappzgs00", {
          pageSize: 10,
          pageNum: 1,
          startDate: this.startDate3,
          endDate: this.endDate3,
          g0enterpriseCode: this.selectValue,
        }).then(res => {
          this.loading13 = false
          res = JSON.parse(res.data.msg);
          // console.log(res, "请求App总数成功");
          this.AppAllNumTwo = res.data[0].k0appcount
          this.AppAllNumTwo = thousandFilter(this.AppAllNumTwo)
        })
      },
      //请求App类型占比
      ProportionOfAPPTypes() {
        this.loading11 = true
        postAppId("dbjyxjdhxtapplxzb00", {
          pageSize: 10,
          pageNum: 1,
          g0enterpriseCode: this.selectValue,
        }).then(res => {
          this.loading11 = false
          res = JSON.parse(res.data.msg);
          // console.log(res, "请求App类型占比成功");
          this.AppType = []
          let arr = []
          for (let i = 0; i < res.data.length; i++) {
            this.AppType.push(res.data[i].k0pct)
            arr.push({ name: res.data[i].g0softwaretypename, value: res.data[i].k0cnt })
          }

          let AppStatisticalDom = document.getElementById('AppStatisticalBox');
          this.echartsArr.seventhEcharts = echarts.init(AppStatisticalDom);
          // AppStatistical && this.echartsArr.seventhEcharts.setOption(AppStatistical);
          this.echartsArr.seventhEcharts.setOption({
            tooltip: {
              trigger: 'item'
            },
            labelLine: {
              show: false
            },
            series: [{
              color: ['#FA6400', '#B620E0', '#F7B500', '#2FC25B'],
              name: 'App类型占比',
              type: 'pie',
              radius: [40, 60],
              center: ['50%', '50%'],
              // roseType: 'area',
              data: [{
                value: res.data[0].k0cnt,
                name: res.data[0].g0softwaretypename
              },
              {
                value: res.data[1].k0cnt,
                name: res.data[1].g0softwaretypename
              },
              {
                value: res.data[2].k0cnt,
                name: res.data[2].g0softwaretypename
              },
              {
                value: res.data[3].k0cnt,
                name: res.data[3].g0softwaretypename
              },
              ],
            }]
          });
        })
      },
      ProportionOfAPPTypes_two() {
        this.loading14 = true
        postAppId("dbjyxjdhxtapplxzb00", {
          pageSize: 10,
          pageNum: 1,
          startDate: this.startDate3,
          endDate: this.endDate3,
          g0enterpriseCode: this.selectValue,
        }).then(res => {
          this.loading14 = false
          res = JSON.parse(res.data.msg);
          // console.log(res, "请求App类型占比成功");
          this.AppTypeTwo = []
          let arr = []
          for (let i = 0; i < res.data.length; i++) {
            this.AppTypeTwo.push(res.data[i].k0pct)
            arr.push({ name: res.data[i].g0softwaretypename, value: res.data[i].k0cnt, percent: res.data[i].k0pct })
          }

          let groupSeriesPushTwoDom = document.getElementById('groupSeriesPushTwoBox');
          this.echartsArr.ninthEcharts = echarts.init(groupSeriesPushTwoDom);
          this.echartsArr.ninthEcharts.setOption({
            title: {
              text: "工作台应用类型占比",
              left: "5%",
              textStyle: {
                color: "#3E3F42",
                fontSize: 18,
                fontWeight: "bold",
              },
            },
            tooltip: {
              trigger: 'item',
            },
            color: ['#FA6400', '#B620E0', '#F7B500', '#2FC25B'],
            legend: {
              left: '5%',
              top: '25%',
              orient: 'vertical',
              itemGap: 3,
              itemWidth: 6,
              itemHeight: 6,
              icon: 'circle',
              formatter: name => {
                for (const v of arr) {
                  if (v.name === name) {
                    return name + '：' + v.percent
                  }
                }
              }
            },
            series: [{
              name: '工作台应用类型占比',
              type: 'pie',
              radius: ['40%', '55%'],
              center: ['75%', '55%'],
              label: {
                normal: {
                  show: true,
                  position: 'center',
                  color: '#4c4a4a',
                  formatter: '{total|' + '总数' + '}' + '\n\r' + this.AppAllNumTwo,
                  rich: {
                    total: {
                      fontSize: 12,
                      fontFamily: "微软雅黑",
                      color: '#454c5c'
                    },
                    active: {
                      fontFamily: "微软雅黑",
                      fontSize: 20,
                      color: '#6c7a89',
                      lineHeight: 30,
                    },
                  }
                },
              },
              labelLine: {
                show: false
              },
              data: [{
                value: res.data[1].k0cnt,
                name: res.data[1].g0softwaretypename,
                // color:'#2fc25b'
              },
              {
                value: res.data[2].k0cnt,
                name: res.data[2].g0softwaretypename,
                // color:'#fce4a5'
              },
              {
                value: res.data[0].k0cnt,
                name: res.data[0].g0softwaretypename,
                // color:'#947bd3'
              },
              {
                value: res.data[3].k0cnt,
                name: res.data[3].g0softwaretypename,
                // color:'#d3cc7b'
              },
              ]
            }]
          });
        })
      },
      //请求APP新增趋势
      AppNewTrend() {
        this.loading12 = true
        postAppId("appxzqs00", {
          pageSize: 100,
          pageNum: 1,
          startDate: this.startDate3,
          endDate: this.endDate3,
          g0enterpriseCode: this.selectValue,
        }).then(res => {
          res = JSON.parse(res.data.msg);
          // console.log(res, "请求APP新增趋势成功");
          if (res.total) {
            this.Enterprise_self_construction_trend.g0year = []
            this.Enterprise_self_construction_trend.k0newcreate = []
            for (let i = 0; i < res.data.length; i++) {
              this.Enterprise_self_construction_trend.g0year.push(res.data[i].g0year)
              this.Enterprise_self_construction_trend.k0newcreate.push(res.data[i].k0newcreate)
            }
          } else {
            this.Enterprise_self_construction_trend.g0year = []
            this.Enterprise_self_construction_trend.k0newcreate = []
          }

          let companSselfBuiltAppTrendDom = document.getElementById('companSselfBuiltAppTrendBox');
          this.echartsArr.eighthEcharts = echarts.init(companSselfBuiltAppTrendDom);
          // companSselfBuiltAppTrend && this.echartsArr.eighthEcharts.setOption(companSselfBuiltAppTrend);
          this.echartsArr.eighthEcharts.setOption({
            xAxis: {
              type: 'category',
              data: this.Enterprise_self_construction_trend.g0year
            },
            tooltip: {
              trigger: 'item'
            },
            yAxis: {
              type: 'value'
            },
            color: ['#2FC25B'],
            series: [{
              data: this.Enterprise_self_construction_trend.k0newcreate,
              type: 'bar',
              barGap: '80%',
              /*多个并排柱子设置柱子之间的间距*/
              barCategoryGap: '60%',
              /*多个并排柱子设置柱子之间的间距*/
              label: {
                show: false,
                position: 'top'
              }
            }]
          })
          this.loading12 = false
        })
      },
      //请求APP下载明细表数据
      AppDownloadDetails() {
        this.loading15 = true
        postAppId("appxzmxb00", {
          pageSize: this.size_four,
          pageNum: this.page_four,
          startDate: this.startDate4,
          endDate: this.endDate4,
          g0softwareName: this.AppDownloadTableSearchValue,
          g0enterpriseCode: this.AppDownloadTableValue,
          orderType: this.sortValue2,
        }).then(res => {
          this.loading15 = false
          res = JSON.parse(res.data.msg);
          // console.log(res, "请求APP下载明细表数据");
          if (res.total) {
            this.AppDownloadTableTableData = res.data
          } else {
            this.AppDownloadTableTableData = []
          }
          this.length_four = res.total

          // 跳转到App下载明细页
          let AppDownloadTableArr = document.getElementsByClassName("el-table_5_column_20")
          setTimeout(() => {
            for (let i = 0; i < AppDownloadTableArr.length; i++) {
              AppDownloadTableArr[i].addEventListener("click", () => {
                sessionStorage.setItem('scrollTop', document.documentElement.scrollTop)
                sessionStorage.setItem('isAppDownloadTableSelect', this.isAppDownloadTableSelect)
                sessionStorage.setItem('Date_four', JSON.stringify([this.startDate4, this.endDate4]))
                sessionStorage.setItem('code3', this.AppDownloadTableValue)
                sessionStorage.setItem('code', this.selectValue)
                sessionStorage.setItem('isSelect', this.isSelect)
                window.location.href = './AppDownloadDetails.html?code=' + this.AppDownloadTableTableData[i - 1].g0softwarecode +
                  '&name=' + this.AppDownloadTableTableData[i - 1].g0softwarename + '&Code=' + this.AppDownloadTableTableData[i - 1].g0enterprise_code +
                  "&startDate=" + this.startDate4 + "&endDate=" + this.endDate4;
              })
            }
            this.flag_3 = true
          })
        })
      },
      //APP下载
      AppDownload() {
        if (this.length_four > 50000) {
          this.$notify.error({
            title: '下载失败',
            message: "下载数据条数不能超过50000条",
          });
          return
        }
        this.loading15 = true
        getAppDownload("appxzmxb00Export", {
          pageSize: this.length_four,
          pageNum: 1,
          startDate: this.startDate4,
          endDate: this.endDate4,
          g0softwareName: this.AppDownloadTableSearchValue,
          g0enterpriseCode: this.AppDownloadTableValue,
          orderType: this.sortValue2,
        }).then(res => {
          if (!res) {
            return
          }
          this.loading15 = false

          let url = window.URL.createObjectURL(res.data)
          let link = document.createElement("a")
          link.style.display = 'none'
          link.href = url
          link.setAttribute('download', 'APP下载明细表.xlsx')
          document.body.appendChild(link)
          link.click()
        })
      },
      //补零函数
      ZeroComplement(num) {
        if (num < 10) {
          return "0" + num;
        } else {
          return num;
        }
      }
    }
  })
</script>